package com.zmn.oms.services.impl.work.epidemiccontrol;

import com.zmn.oms.model.entity.work.OrderWorkEpidemicControl;
import com.zmn.oms.persistence.interfaces.work.OrderWorkEpidemicControlDao;
import com.zmn.oms.services.interfaces.work.epidemiccontrol.OrderWorkEpidemicControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 类描述 工单疫情管控
 *
 * @author fubiao
 * @since 2022/08/16
 */
@Service
public class OrderWorkEpidemicControlServiceImpl implements OrderWorkEpidemicControlService {

    @Autowired
    private OrderWorkEpidemicControlDao workEpidemicControlDao;

    @Override
    public OrderWorkEpidemicControl findByWorkIdAndNodeType(Long orderId, Long workId, Integer nodeType) {
        return workEpidemicControlDao.findByWorkIdAndNodeType(orderId, workId, nodeType);
    }

    @Override
    public Integer countByWorkIdAndNodeType(Long orderId, Long workId, Integer nodeType) {
        return workEpidemicControlDao.countByWorkIdAndNodeType(orderId, workId, nodeType);
    }

    @Override
    public Integer insert(OrderWorkEpidemicControl workEpidemicControl) {
        return workEpidemicControlDao.insert(workEpidemicControl);
    }

    @Override
    public Integer updateByWorkIdAndNodeType(OrderWorkEpidemicControl workEpidemicControl) {
        return workEpidemicControlDao.updateByWorkIdAndNodeType(workEpidemicControl);
    }

    @Override
    public Integer deleteByWorkIdAndNodeType(Long orderId, Long workId, Integer nodeType) {
        return workEpidemicControlDao.deleteByWorkIdAndNodeType(orderId, workId, nodeType);
    }
}
